Skip to content

docs: scope the @StrutsParameter "never set" claim to named properties - #328

Merged
lukaszlenart merged 1 commit into
mainfrom
docs/strutsparameter-any-setter-scope
Sep 11, 2026
Merged

lukaszlenart merged 1 commit into
mainfrom
docs/strutsparameter-any-setter-scope

Conversation

@lukaszlenart

Copy link
Copy Markdown
Member

The @StrutsParameter page told readers that JSON and REST deserialization means "unauthorized fields are never set". That holds for properties the deserializer binds by name, but a Jackson any-setter is a separate sink that the REST plugin's authorization wrapper never wraps — unknown keys routed to it are bound with no @StrutsParameter check, even with struts.parameters.requireAnnotations enabled and in the same request in which an ordinary unannotated setter on the same class is correctly rejected.

That sentence is what made the behaviour look like a broken promise when it was reported. This qualifies the bullet and documents the gap in its own section, next to the existing creator-bound-properties note covering the same class of problem.

Also documented, because both are easy to assume wrongly:

  • an any-setter beneath an unauthorized parent is still unreachable — the parent is rejected first and its subtree skipped;
  • @JsonUnwrapped is a named property and is unaffected.

The JSON plugin is not affected — it uses no Jackson, so source/plugins/json/index.md keeps its identical wording unchanged.

Describes current behaviour only. The framework-side control is tracked as WW-5712, which is not yet merged, so no configuration flag is documented here.

🤖 Generated with Claude Code

https://claude.ai/code/session_012HF8BGrYmCVnqUdQJJ1XPM

The annotation page told readers that JSON and REST deserialization means
unauthorized fields are never set on the target object. That is true of the
properties the deserializer binds by name, but a Jackson any-setter is a
separate sink that the REST plugin's authorization wrapper never wraps, so
unknown keys routed to it are bound with no @StrutsParameter check at all --
in the same request in which an ordinary unannotated setter on the same class
is correctly rejected.

Qualify the bullet and document the gap in its own section, alongside the
existing creator-bound-properties note that covers the same class of problem.
The JSON plugin is unaffected: it does not use Jackson, so its own page's
identical wording stays accurate and is left alone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012HF8BGrYmCVnqUdQJJ1XPM
@asf-ci

asf-ci commented Sep 3, 2026

Copy link
Copy Markdown

Staged site is ready at https://struts.staged.apache.org/

@lukaszlenart
lukaszlenart merged commit 08e3ed4 into main Sep 11, 2026
1 check passed
@lukaszlenart
lukaszlenart deleted the docs/strutsparameter-any-setter-scope branch September 11, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants